CXX=g++
LDFLAGS= -lpthread -lprotobuf -lstdc++fs 
CXXFLAGS= -Wall -w -g -ggdb -O0 -std=c++17 -Wno-unused -Wno-sign-compare -Wno-deprecated-declarations -Wno-deprecated -std=c++17 

.PHONY: clean all

all:  echo_server

ifndef LIBNET_PATH
  $()
	LIBNET_PATH=../../../../lib
endif
LIBNET_INCLUDE_DIR=$(LIBNET_PATH)
LIBNET_LIBRARY=$(LIBNET_PATH)/libzrpc.a

CXXFLAGS+= -I $(LIBNET_INCLUDE_DIR) -I ../../../

DEP_LIBS = $(LIBNET_LIBRARY)
LDFLAGS := $(DEP_LIBS) $(LDFLAGS)


echo_server: echo_server.cc 
	$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)

clean:
	find . -name "*.[oda]" -exec rm -f {} \;
	rm -rf echo_server 
